<template>
	<view class="page-index" :style="{'padding-top':NavHeight+'px'}">
		<view class="user" v-if="token">
			<view class="avatar">
				<image :src="userInfo.avatar?userInfo.avatar:avatar" mode="" style="width:160rpx;height: 160rpx;" class="image"></image>
			</view>
			<view class="user-name" @click="getUserInfo()">
				<view class="nickname" v-if="token">
					<text v-if="userInfo.wxname==1">{{userInfo.nickname}}</text>
					<text v-if="userInfo.wxname==0">点击授权头像和昵称</text>
				</view>
				<view class="label" v-if="token">
					{{userInfo.phone}}
				</view>
			</view>

		</view>
		<button class="user nbtn" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="!token">
			<view class="avatar">
				<image :src="avatar" mode="" style="width:160rpx;height: 160rpx;" class="image"></image>
			</view>
			<view class="user-name">
				<view class="nickname">
					注册/登录
				</view>
				<view class="label">
					登录后可体验更多服务
				</view>
			</view>
		</button>
		<!-- 		<view @click="go()" style="margin-top: 36rpx;">
			<image src="/static/user/微信图片_20220615180729.jpg" mode="" style="width: 100%;height: 96px;border-radius: 8rpx;"></image>
		</view> -->
		<!-- 发布求租 -->
		<view class="menu-list">
			<view class="list-item" v-for="(item,index) in menuList" :key="index" @click="navTo(item,index)">
				<view class="item-left">
					<view class="image-box">
						<image :src="item.imgUrl" mode="" class="image"></image>
					</view>
					<view class="value">
						{{item.value}}
					</view>
				</view>
				<view class="item-right">
					<image src="../../static/user/right.png" mode="" class="image"></image>
				</view>
			</view>
		</view>
		<!-- 		<view class="fixed" :style="{'height':NavHeight+'px'}">
			<image src="/static/tabbar/navbar.png" mode="" style="width: 164rpx;height: 36rpx;margin-bottom: 36rpx;"></image>
		</view> -->
	</view>

</template>

<script src="./page.js"></script>

<style scoped lang="scss">
	@import "page.scss";
</style>
